<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title></title>
	<link rel="stylesheet" href="">
	<script type="text/javascript" src="js/artTemplate.js"></script>
	<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
</head>
<body>

    <div id="container"></div>


    {{include 'test2.html'}}

	

	<script>
		var data = {
		    isAdmin: true,
		    list : {
		        "电视" : {
		            "大陆剧" : ["好大一个家","平凡的世界","收获的季节","刘老根","乡村爱情","士兵突击","神探狄仁杰","武媚娘传奇"],
		            "美剧" : ["吸血鬼日记","闪电侠","行尸走肉","童话镇","破产姐妹","格林"],
		            "台剧" : ["有爱一家人","再见阿郎","我的宝贝四千金","新白娘子传奇"],
		            "韩剧" : ["来自星星的你","匹诺曹","奔跑吧玫瑰","美女的诞生","未来的选择",],
		        },
		        "电影" : {
		            "动作" : ["A计划","警察故事","黄飞鸿","特务迷城","卧虎藏龙","逗你玩"],
		            "爱情" : ["保定爱情","山楂树之恋","北京遇上西雅图"],
		            "恐怖" : ["僵尸家族","驱鬼警察","僵尸道长"]
		        },
		        "综艺" : {
		            "百变大咖秀" : ["第一期","第二期","第二期","第四期"],
		            "快乐大本营" : ["谢娜","何炅","维嘉","杜海涛","吴昕"],
		            "天天向上" : ["汪涵","欧弟","田园","钱枫","小五"],
		            "康熙来了" : ["小S","蔡康永","赵薇","萧敬腾","阿雅","吴宗宪"]
		        }
		    }
		};
        
        var html = template('demo', data);
		document.getElementById('container').innerHTML = html;
		//注册tabs方法
		$(document).on('click','a',function(e){
		    var target  = $(e.currentTarget).parent();
		    var $self = $(target);
		    if (target.hasClass("nav-menu")) {
		        $(".filter-list").hide();
		        $(".sub-nav-items").hide().eq($self.index()).show();
		    }else if(target.hasClass("nav-item")) {
		        $(".filter-list").hide().eq($(".nav-item").index($self)).show();
		    }
		})

	</script>

</body>
</html>